//
//  BXGDataFactory.m
//  CommunityPrj
//
//  Created by apple on 2017/9/2.
//  Copyright © 2017年 itheima. All rights reserved.
//

#import "BXGDataFactory.h"
#import "BXGCommentViewModel.h"
#import "BXGCommentReplyViewModel.h"
#import "BXGCommentDataModel.h"

@implementation BXGDataFactory

+(instancetype)shareInstance
{
    static BXGDataFactory *factory = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        factory = [BXGDataFactory new];
    });
    return factory;
}

-(NSMutableArray<BXGCommentDataModel*>*)buildCommentDataModel
{
    BXGCommentDataModel *model1 = [BXGCommentDataModel new];
    model1.commentId = @"1";
    model1.text = @"abc";
    model1.arrMediaImage = @[@"test3.png"];
    model1.arrReplyContent = [self buildReplyDataModel];
    
//    BXGCommentDataModel *model2 = [BXGCommentDataModel new];
//    model2.commentId = @"2";
//    model2.text = @"abc";
//    model2.arrMediaImage = nil;
//
//    BXGCommentDataModel *model3 = [BXGCommentDataModel new];
//    model3.commentId = @"3";
//    model3.text = @"abc";
//    model3.arrMediaImage = @[@"test2.png"];
    
    NSMutableArray *arrCommentDataModel = [NSMutableArray new];
    [arrCommentDataModel addObject:model1];
//    [arrCommentDataModel addObject:model2];
//    [arrCommentDataModel addObject:model3];
    
    return arrCommentDataModel;
}

-(NSMutableArray*)buildReplyDataModel
{
    NSMutableArray *array = [NSMutableArray new];
    
    int nCount = 1;
    for(int i=0; i<nCount; i++)
    {
        BXGCommentDataModel *model1 = [BXGCommentDataModel new];
        model1.commentId = @"11";
        model1.text = @"commentcommentcommentcommentcommentcommentcommentcommentcomment";
        model1.arrMediaImage = nil;
        
//
        //        BXGCommentDataModel *model2 = [BXGCommentDataModel new];
        //        model2.commentId = @"22";
        //        model2.text = @"你是谁,怎么不支行 飞机的飞机分解法非 费降低房间诶房间奥分解大师傅法尔发发发飞飞飞发顺丰份额费";
        //        model2.arrMediaImage = nil;

//        BXGCommentDataModel *model3 = [BXGCommentDataModel new];
//        model3.commentId = @"33";
//        model3.text = @"你是谁,怎么不支行 飞机的飞机分解法非 费降低房间诶房间奥分解大师傅法尔发发发飞飞飞发顺丰份额费";
//        model3.arrMediaImage = nil;
//
//        BXGCommentDataModel *model4 = [BXGCommentDataModel new];
//        model4.commentId = @"44";
//        model4.text = @"你是谁,怎么不支行 飞机的飞机分解法非 费降低房间诶房间奥分解大师傅法尔发发发飞飞飞发顺丰份额费飞飞飞";
//        model4.arrMediaImage = nil;
//
//        BXGCommentDataModel *model5 = [BXGCommentDataModel new];
//        model5.commentId = @"55";
//        model5.text = @"dfasdfasfdafdsaaaaaafawf qafsfsamadifojae jag sioaoe faofiaoioaevjiof kldfnfkssdnfafidf jijidajaifas近地方的发发呆积分底肥发分积分抵风机房方法方法iffifi方法费覅将方法ifif发发发分积分积分方法发飞机非法if方法方法非";
//        model5.arrMediaImage = nil;
        
        [array addObject:model1];
//        [array addObject:model2];
//        [array addObject:model3];
//        [array addObject:model4];
//        [array addObject:model5];
    }
    
    return array;
}




@end
